package com.example.test01;

import android.app.Activity;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;

public class TestMenuAcyivity extends MainActivity{
    FrameLayout layout;

    TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test1);
        layout = (FrameLayout) this.findViewById(R.id.bg);
        tv = (TextView) this.findViewById(R.id.we);
        this.registerForContextMenu(tv);
    }

    @Override
    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
        getMenuInflater().inflate(R.menu.main_menu, menu);
        super.onCreateContextMenu(menu, v, menuInfo);
    }
}
//    @Override
//    public boolean onCreateOptionsMenu(Menu menu){
//        getMenuInflater().inflate(R.menu.context_menu,menu);
//        return true;
//    }

